                <?php
                    empty($allowupdate) AND $allowupdate = 0;
                    empty($allowdelete) AND $allowdelete = 0;
                    empty($allowpost) AND $allowpost = 0;
                ?>
                <!--{hook post_list_inc_start.htm}-->

                <?php if($postlist) { foreach($postlist as $_post) { ?>
                    <div class="PostStream-item media <?php echo $_post['classname'];?>" data-pid="<?php echo $_post['pid'];?>" data-uid="<?php echo $_post['uid'];?>">
                        <article class="Post CommentPost">
                            <div>
                                <header class="Post-header">
                                    <ul>
                                        <li class="item-user">
                                            <div class="PostUser">
                                                <h3>
                                                    <a href="<?php echo url("user-$_post[uid]");?>" tabindex="-1">
                                                        <img class="Avatar PostUser-avatar lazy" data-original="<?php echo $_post['user_avatar_url'];?>">
                                                        <span class="username"><?php echo $_post['username'];?></span>
                                                    </a>
                                                </h3>
                                                <ul class="PostUser-badges badges">
                                                    <li>
                                                <?php
                                                    if($_post['user']['gid']==1) {
                                                        echo '<span class="Badge Badge--group--1" title="管理员" data-toggle="tooltip"><i class="icon fa fa-fw fa-wrench Badge-icon"></i></span>';
                                                    } elseif($_post['user']['gid']>1 && $_post['user']['gid']<6) {
                                                        echo '<span class="Badge Badge--group--4" title="版主" data-toggle="tooltip"><i class="icon fa fa-fw fa-user-secret Badge-icon"></i></span>';
                                                    }
                                                    if($_thread['uid'] == $_post['uid']) {
                                                        echo '<span class="Badge Badge--group--9" title="楼主" data-toggle="tooltip"><i class="icon fa fa-fw fa-user Badge-icon"></i></span>';
                                                    }
                                                ?>
                                                    </li>
                                                </ul>
                                            </div>
                                        </li>
                                        <li class="item-meta">
                                            <div class="PostMeta"><?php echo $_post['create_date_fmt'];?></div>
                                        </li>
                                    </ul>
                                </header>
                                <div class="message">
                                    <!--{hook post_list_inc_subject_before.htm}-->
                                    <?php if(!empty($_post['subject'])) { ?>
                                        <a href="<?php echo url("thread-$_post[tid]");?>" target="_blank"><?php echo $_post['subject'];?></a>
                                    <?php } ?>
                                    <!--{hook post_list_inc_subject_after.htm}-->

                                    <!--{hook post_list_inc_message_before.htm}-->
                                    <div class="Post-body"><?php echo $_post['message_fmt'];?></div>
                                    <!--{hook post_list_inc_message_after.htm}-->

                                    <!--{hook post_list_inc_filelist_before.htm}-->
                                    <?php echo post_file_list_html($_post['filelist']);?>
                                    <!--{hook post_list_inc_filelist_after.htm}-->
                                </div>
                                <aside class="Post-actions">
                                    <ul>
                                        <!--{hook post_list_inc_quote_before.htm}-->
                                        <?php if($allowpost) { ?>
                                        <li>
                                            <a class="btn btn--icon btn-flat post_reply" href="javascript:void(0)" data-tid="<?php echo $_post['tid'];?>" data-pid="<?php echo $_post['pid'];?>" data-toggle="tooltip" title="<?php echo lang('quote');?>" role="button">
                                                <i class="icon fa fa-fw fa-quote-left btn-icon f-16 icon-reply"></i>
                                            </a>
                                        </li>
                                        <?php } ?>
                                        <!--{hook post_list_inc_quote_after.htm}-->

                                        <!--{hook post_list_inc_update_before.htm}-->
                                        <?php if($allowupdate || $_post['allowupdate']) { ?>
                                        <li>
                                            <a class="btn btn--icon btn-flat post_update" href="<?php echo url("post-update-$_post[pid]");?>" data-toggle="tooltip" title="<?php echo lang('edit');?>" role="button">
                                                <i class="icon fa fa-fw fa-edit btn-icon f-16 icon-edit"></i>
                                            </a>
                                        </li>
                                        <?php } ?>
                                        <!--{hook post_list_inc_update_after.htm}-->

                                        <!--{hook post_list_inc_delete_before.htm}-->
                                        <?php if($allowdelete || $_post['allowdelete']) { ?>
                                        <li>
                                            <a class="btn btn--icon btn-flat post_delete _confirm" data-href="<?php echo url("post-delete-$_post[pid]");?>" data-confirm-text="<?php echo lang('confirm_delete');?>" data-toggle="tooltip" title="<?php echo lang('delete');?>" role="button">
                                                <i class="icon fa fa-fw fa-trash-o btn-icon f-16 icon-remove"></i>
                                            </a>
                                        </li>
                                        <?php } ?>
                                        <!--{hook post_list_inc_delete_after.htm}-->

                                        <!--{hook post_list_inc_floor_before.htm}-->
                                        <?php if($_post['floor']) { ?>
                                        <li>
                                            <div class="btn btn-link cursor-default">
                                                <span class="floor-parent">
                                                    <span class="floor"><?php echo $_post['floor'];?></span><?php echo lang('floor');?>
                                                </span>
                                            </div>
                                        </li>
                                        <?php } ?>
                                        <!--{hook post_list_inc_floor_after.htm}-->

                                    </ul>
                                </aside>
                            </div>
                        </article>
                    </div>
                <?php }} ?>

                <!--{hook post_list_inc_end.htm}-->